home *** CD-ROM | disk | FTP | other *** search
- #
- # $PROJECT: Include Makefiles
- #
- # $VER: sasc.mk 1.3 (31.12.95)
- #
- # by
- #
- # Stefan Ruppert , Windthorststrasse 5 , 65439 Floersheim , GERMANY
- #
- # (C) Copyright 1995
- # All Rights Reserved !
- #
- # $HISTORY:
- #
- # 31.12.95 : 001.003 : added datatype target
- # 02.09.95 : 001.002 : added checkinsym
- # 21.07.95 : 001.001 : initial
- #
-
- ##############################################################################
- #
- # command to use including path
- #
-
- SC = sc
- CC = sc
- LD = slink
- AR = sc:c/oml
- MV = move
- RM = delete
- CP = copy
- MKPROTO = c:swtools/mkproto
- MKPRAGMA= c:swtools/pragma_gen
- MKDOC = c:swtools/makedoc
- MKGUIDE = c:swtools/xrefconvert
- CATCOMP = c:swtools/catcomp
- FLUSHLIB= c:mc/flushlib
- CI = ci
- CO = co
- MKDIR = mkdir
- PROTECT = c:protect
- YACC = bison-122
-
- ##############################################################################
- #
- # GNUMake SAS-C pattern rules
- #
- # These rules compiles every c and assembler source and puts the output to
- # the OBJDIR directory
- #
-
- $(OBJDIR)/%.o: %.asm
- $(SC) $(SCOPTS) $(SCIDIRS) $(DEBUG) $(SCOPTIMIZE) ASM $< OBJNAME $@
- $(ARCHIVER)
-
-
-
- ifneq ($(HOLDCCODE)X,X)
- $(OBJDIR)/%.o: %.cc
- $(SC) $(SCOPTS) $(SCIDIRS) $(DEBUG) $(SCOPTIMIZE) CXXONLY CXXSRC $< OBJNAME t:
- $(CP) t:$*..c $(@D)
- $(SC) $(SCOPTS) $(SCIDIRS) $(DEBUG) $(SCOPTIMIZE) CSRC t:$*..c OBJNAME t:
- $(RM) t:$*..c
- $(MV) t:$*..o $@
- $(ARCHIVER)
- else
- $(OBJDIR)/%.o: %.cc
- $(SC) $(SCOPTS) $(SCIDIRS) $(DEBUG) $(SCOPTIMIZE) CXXSRC $< OBJNAME t:
- $(MV) t:$(@F) $@
- $(ARCHIVER)
- endif
-
- $(OBJDIR)/%.o: %.c
- $(SC) $(SCOPTS) $(SCIDIRS) $(DEBUG) $(SCOPTIMIZE) $(GSTOPTS) CSRC $< OBJNAME t:
- $(MV) t:$(@F) $@
- $(ARCHIVER)
-
- ##############################################################################
- #
- # make datatype, only if the DATATYPE varibale is specified
- #
-
- ifneq ($(DATATYPE)X,X)
- $(DATATYPE) : $(OBJS)
- -$(LD) from $^ to $@ $(SLOPT) $(LINKLIBS)
- $(CP) $@ $(DTYPEDEST)
- -$(FLUSHLIB) ${@F}
- endif
-
-
- ##############################################################################
- #
- # make SAS-C GST file
- #
-
- $(GST): $(GSTINC)
- $(SC) MGST $(GST) $(GSTINC) $(INCDIRS) NOOBJNAME NOICON
-
- ##############################################################################
- #
- # make prototypes
- #
-
- protos: $(PROTOS)
-
- $(PROTOS): $(SRCS)
- $(MKPROTO) $(SRCS) TO $(PROTOS)
-
-
-
- ##############################################################################
- #
- # generate pragmas out of fd files
- #
-
- ifneq ($(LIBPRAGMA)X,X)
- $(LIBPRAGMA): $(LIBFD) $(LIBPROTOS)
- $(MKPRAGMA) $(LIBFD) $@ $(LIBPROTOS)
- endif
-
- ##############################################################################
- #
- # generate c-source file out of a catalog description
- #
-
- ifneq ($(CATDIR)X,X)
- $(EMPTYCT) : $(CATDESC)
- $(CATCOMP) $^ CTFILE $@ $(CATFLAGS)
-
- $(CATSRCS) : $(CATDESC)
- $(CATCOMP) $^ CFILE $@ $(CATFLAGS)
-
- $(CATDIR)/%/$(CATALOG): $(CATTRANSDIR)/%.ct
- $(CATCOMP) $(CATDESC) $^ CATALOG $@
- endif
-
- ##############################################################################
- #
- # check in all files
- #
-
- checkin:
- $(CI) -I -r$(VERSION).$(REVISION) -t-initial $(subst RCS,,$(wildcard *))
-
- checkinsym:
- $(CI) -I -NV$(VERSION)_$(REVISION) -r -t-initial $(subst RCS,,$(wildcard *))
-
- checkout:
- $(CO) -l $(filter-out Makefile%,$(subst RCS/,,$(wildcard RCS/*)))
-
- ##############################################################################
- #
- # make the object directory
- #
-
- $(DIRS):
- $(MKDIR) $@ all
-
- ##############################################################################
- #
- # clean up
- #
-
- objclean:
- $(RM) $(OBJDIR)/* All
-
-
-